<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面-L-admin1.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"
          name="viewport"/>
    <link href="../ladmin/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
    <link href="../ladmin/css/font.css" rel="stylesheet">
    <link href="../ladmin/css/xadmin.css" rel="stylesheet">
    <script src="../ladmin/js/jquery.min.js"></script>
    <script src="../ladmin/lib/layui/layui.js"></script>
    <script src="../ladmin/js/xadmin.js" type="text/javascript"></script>
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
    <link href="../ladmin/lib/layui/css/modules/layer/default/layer.css" rel="stylesheet" type="text/css">
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<table class="layui-show" id="followTable" lay-filter="followTable" style="width: 80%"></table>
<script id="barDemo" type="text/html">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="update">编辑</button>
        <button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="delete">删除</button>
    </div>
</script>
<script type="text/javascript">

    layui.use(['element', 'table'], function () {

        var $ = layui.jquery,
            element = layui.element, //Tab的切换功能，切换事件监听等，需要依赖element模块
            table = layui.table;
            table.render({
            elem: "#followTable",
            skin: 'line',
                method:'POST',
                url: 'getHistoryRepairForms',
            cols: [
                [
                //{field: "phoneNumber", title: "手机号", align: 'center', width: 150},
                {field: "nickname", title: "称呼", align: 'center', width: 80},
                //{field: "sex", title: "性别", align: 'left', width: 50},
                {field: "address", title: "地址", align: 'left', width: 150},
                {field: "repairMethod", title: "报修方式", align: 'center', width: 100},
                {field: "startDate", title: "报修时间", align: 'center', width: 150, sort: true},
                {field: "state", title: "处理状态", align: 'center', width: 100},
                {field: "description", title: "描述", align: 'left', width: 300},
                {field: "endDate", title: "完成时间", align: 'center', width: 150}

            ]
            ],

                done: function (res, curr, count) {
                    table = res.data;
                },
                page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                    layout: ['prev', 'page', 'next', 'skip'] //自定义分页布局
                    , groups: 1 //只显示 1 个连续页码
                    , first: false //不显示首页
                    , last: false //不显示尾页

                }

            });

    })

</script>
</body>
</html>